/*****************************************************************************************
**  Author:dgz master
**  Contact：jiduxiong@dagongzao.com
**
*****************************************************************************************/
//此js文件是用来自定义扩展业务代码，可以扩展一些自定义页面或者重新配置生成的代码

let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: "",
    gridBody: "",
    gridFooter: "",
    //新建、编辑弹出框扩展组件
    modelHeader: "",
    modelBody: "",
    modelRight: "",
    modelFooter: ""
  },
  tableAction: "", //指定某张表的权限(这里填写表名,默认不用填写)
  buttons: { view: [], box: [], detail: [] }, //扩展的按钮
  methods: {
    syncToMes() {
      const userInfo = this.$store.getters.getUserInfo();
      const userName = userInfo.userName;
      console.log("当前用户信息:", userInfo);
      if (this.editFormFields?.Name?.trim() != "") {
        const loadingInstance = this.$loading({
          lock: true,
          text: '同步MES数据中···',
          spinner: 'el-icon-loading',
          background: 'rgba(247, 237, 237, 0.7)'
        });
        //var readorwrite = {
        const readorwrite = {
          Way: String("write"),
          Name: String(this.editFormFields.Name),
          UserName: String(userName),
          AtmcnBlueprintNo: String(this.editFormFields.AtmcnBlueprintNo),  //安泰图纸号
          PartName: this.editFormFields.PartName,  //零件名称/SAP
          PartNo: this.editFormFields.PartNo,  //零件号/组装号
          ProductRemark: this.editFormFields.ProductRemark,  //产品备注
          Exterimental: this.editFormFields.Exterimental,  //是否是试验品
          BlankForSaleOk: this.editFormFields.BlankForSaleOk,  //毛坯产品
          Application: this.editFormFields.Application,  //应用类型
          PlantIds: this.editFormFields.PlantIds,  //所属工厂
          ByproductTopIds: this.editFormFields.ByproductTopIds,  //产出其他产品
          ShareTopIds: this.editFormFields.ShareTopIds,  //共享库存工艺单
          OemProductOk: this.editFormFields.OemProductOk,  //OEM产品
          RecycleFlg: this.editFormFields.RecycleFlg,  // 可循环材料
          OriginalProductCode: this.editFormFields.OriginalProductCode,  //原发产品
          RemarkCipianjiao: this.editFormFields.RemarkCipianjiao,  // 磁偏角要求
          GeoType1: this.editFormFields.GeoType1,  // 
          GeoValue1: this.editFormFields.GeoValue1,  // 
          GeoRemark1: this.editFormFields.GeoRemark1,  // 
          GeoType2: this.editFormFields.GeoType2,  // 
          GeoValue2: this.editFormFields.GeoValue2,  // 
          GeoRemark2: this.editFormFields.GeoRemark2,  // 
          GeoType3: this.editFormFields.GeoType3,  // 
          GeoValue3: this.editFormFields.GeoValue3,  // 
          GeoRemark3: this.editFormFields.GeoRemark3,  // 
          GeoType4: this.editFormFields.GeoType4,  // 
          GeoValue4: this.editFormFields.GeoValue4,  // 
          GeoRemark4: this.editFormFields.GeoRemark4,  // 
          GeoType5: this.editFormFields.GeoType5,  // 
          GeoValue5: this.editFormFields.GeoValue5,  // 
          GeoRemark5: this.editFormFields.GeoRemark5,  // 

          Weight: this.editFormFields.Weight,  //单重
          SurfaceArea: this.editFormFields.SurfaceArea, //表面积

          RoughShapeId: this.editFormFields.RoughShapeId,  //毛坯尺寸Id
          DimenSize1: this.editFormFields.DimenSize1,  //维度尺寸1
          DimenSize2: this.editFormFields.DimenSize2,  //维度尺寸2
          DimenSize3: this.editFormFields.DimenSize3,  //维度尺寸3
          MagneticAngle: this.editFormFields.MagneticAngle,  //磁方向角度
          DimenTol1: this.editFormFields.DimenTol1,  //维度1公差（范围）
          DimenTol2: this.editFormFields.DimenTol2,  //维度2公差（范围）
          DimenTol3: this.editFormFields.DimenTol3,  //维度3公差（范围）
          MaterialGrade: this.editFormFields.MaterialGrade,  //材料性能
          SteelGradeId: this.editFormFields.SteelGradeId,  //钢号
          SinteringType: this.editFormFields.SinteringType,  //烧结工艺
          RemarkCailiao: this.editFormFields.RemarkCailiao,  //出货要求
          RemarkPackaging: this.editFormFields.RemarkPackaging,  //包装要求

          ProductShapeId: this.editFormFields.ProductShapeId,  //产品尺寸Id
          ChanpinProductDimesSize1: this.editFormFields.ChanpinProductDimesSize1,  //维度尺寸1
          ChanpinProductDimesSize2: this.editFormFields.ChanpinProductDimesSize2,  //维度尺寸2
          ChanpinProductDimesSize3: this.editFormFields.ChanpinProductDimesSize3,  //维度尺寸3
          ChanpinProductTol1: this.editFormFields.ChanpinProductTol1,  //维度1公差（范围）
          ChanpinProductTol2: this.editFormFields.ChanpinProductTol2,  //维度2公差（范围）
          ChanpinProductTol3: this.editFormFields.ChanpinProductTol3,  //维度3公差（范围）

          GradeAfterPermeation: this.editFormFields.GradeAfterPermeation,  //渗透后磁性能

          DaojiaoId: this.editFormFields.DaojiaoId,  //倒角要求
          DucenghouduId: this.editFormFields.DucenghouduId,  //镀层厚度
          RemarkDiandu: this.editFormFields.RemarkDiandu,  //电镀其他要求

          QtyPerChest: this.editFormFields.QtyPerChest,  //每箱数量
          QtyPerBox: this.editFormFields.QtyPerBox,  //每盒数量
          QtyPerBag: this.editFormFields.QtyPerBag,  //每袋数量

          PermeationGongyiId: this.editFormFields.PermeationGongyiId,  //渗透工艺


          WorkcenterType1: this.editFormFields.WorkcenterType1,  //车间类型1-加工
          MrpWorkcenter1: this.editFormFields.MrpWorkcenter1,  //工作中心1
          PassRate1: this.editFormFields.PassRate1,  //合格率1
          PenaltyPassRate1: this.editFormFields.PenaltyPassRate1,  //惩罚合格率1
          Area1: this.editFormFields.Area1,  //面积1
          GeoType1_1: this.editFormFields.GeoType1_1,  //加工1形位类型1_1
          GeoValue1_1: this.editFormFields.GeoValue1_1,  //加工1形位值1
          GeoType1_2: this.editFormFields?.GeoType1_2 ?? "",  //加工1形位类型1_2
          GeoValue1_2: this.editFormFields.GeoValue1_2,  //加工1形位值2
          GeoType1_3: this.editFormFields?.GeoType1_3 ?? "",  //加工1形位类型1_3
          GeoValue1_3: this.editFormFields.GeoValue1_3,  //加工1形位值3
          WorkunitCatalogId1: this.editFormFields.WorkunitCatalogId1,  //加工1加工类型
          SquareUnitPriceId1: this.editFormFields.SquareUnitPriceId1,  //加工1价格表项

          WorkcenterType2: this.editFormFields.WorkcenterType2,  //车间类型2-渗透
          MrpWorkcenter2: this.editFormFields.MrpWorkcenter2,  //工作中心2-渗透
          Magnetic: this.editFormFields.Magnetic,  //渗透-磁性能性能要求
          WorkcenterType3: this.editFormFields.WorkcenterType3,  //车间类型2-渗透
          MrpWorkcenter3: this.editFormFields.MrpWorkcenter3,  //工作中心2-渗透
          ChamferRequirements: this.editFormFields.ChamferRequirements,  //倒角要求
          WorkcenterType4: this.editFormFields.WorkcenterType4,  //车间类型2-渗透
          MrpWorkcenter4: this.editFormFields.MrpWorkcenter4,  //工作中心2-渗透
          PassRate2: this.editFormFields.PassRate2,  //电镀合格率

          BlankInspectType1: this.editFormFields.BlankInspectType1,  //毛坯检验项目1
          BlankInspectOQC1: this.editFormFields.BlankInspectOQC1,  //毛坯OQC标记1
          BlankInspectQClevel1: this.editFormFields.BlankInspectQClevel1,  //毛坯QC级别1
          BlankInspectSampleQty1: this.editFormFields.BlankInspectSampleQty1,  //毛坯送样数量1
          BH_Temperature: this.editFormFields.BH_Temperature,  //毛坯BH检验-温度
          BH_br_range: this.editFormFields.BH_br_range,  //毛坯BH检验-
          BH_hcb_range: this.editFormFields.BH_hcb_range,  //毛坯BH检验-
          BH_hcj_range: this.editFormFields.BH_hcj_range,  //毛坯BH检验-
          BH_bh_range: this.editFormFields.BH_bh_range,  //毛坯BH检验-
          BH_hk_range: this.editFormFields.BH_hk_range,  //毛坯BH检验-
          BH_hd5_range: this.editFormFields.BH_hd5_range,  //毛坯BH检验-
          BH_percent_range: this.editFormFields.BH_percent_range,  //毛坯BH检验-

          BlankInspectType2: this.editFormFields.BlankInspectType2,  //毛坯检验项目2
          BlankInspectOQC2: this.editFormFields.BlankInspectOQC2,  //毛坯OQC标记2
          BlankInspectQClevel2: this.editFormFields.BlankInspectQClevel2,  //毛坯QC级别2
          BlankInspectSampleQty2: this.editFormFields.BlankInspectSampleQty2,  //毛坯送样数量2
          BlankAppearRequirement: this.editFormFields.BlankAppearRequirement,  //毛坯外观检验-外观要求

          WhiteInspectType1: this.editFormFields.WhiteInspectType1,  //白片检验1-镀层厚度
          WhiteInspectOQC1: this.editFormFields.WhiteInspectOQC1,  //
          WhiteInspectQClevel1: this.editFormFields.WhiteInspectQClevel1,  //
          WhiteInspectSampleQty1: this.editFormFields.WhiteInspectSampleQty1,  //
          PlatingThicknessMin: this.editFormFields.PlatingThicknessMin,  //
          PlatingThicknessMax: this.editFormFields.PlatingThicknessMax,  //
          ThicknessFirst: this.editFormFields.ThicknessFirst,  //
          ThicknessSecond: this.editFormFields.ThicknessSecond,  //
          ThicknessThird: this.editFormFields.ThicknessThird,  //

          WhiteInspectType2: this.editFormFields.WhiteInspectType2,  //白片检验2-磁通
          WhiteInspectOQC2: this.editFormFields.WhiteInspectOQC2,  //
          WhiteInspectQClevel2: this.editFormFields.WhiteInspectQClevel2,  //
          WhiteInspectSampleQty2: this.editFormFields.WhiteInspectSampleQty2,  //
          MagneticFluxValue: this.editFormFields.MagneticFluxValue,  //
          MagneticFluxUp: this.editFormFields.MagneticFluxUp,  //
          MagneticFluxDown: this.editFormFields.MagneticFluxDown,  //
          SurfaceUp: this.editFormFields.SurfaceUp,  //
          SurfaceDown: this.editFormFields.SurfaceDown,  //
          OneHours: this.editFormFields.OneHours,  //
          OneTemperature: this.editFormFields.OneTemperature,  //
          OneBakingCon: this.editFormFields.OneBakingCon,  //
          MagneticFluxRemark: this.editFormFields.MagneticFluxRemark,  //

          WhiteInspectType3: this.editFormFields.WhiteInspectType3,  //白片检验3-盐雾
          WhiteInspectOQC3: this.editFormFields.WhiteInspectOQC3,  //
          WhiteInspectQClevel3: this.editFormFields.WhiteInspectQClevel3,  //
          WhiteInspectSampleQty3: this.editFormFields.WhiteInspectSampleQty3,  //
          SaltMistCondition: this.editFormFields.SaltMistCondition,  //
          SaltMistTime: this.editFormFields.SaltMistTime,  //
          SaltMistRemark: this.editFormFields.SaltMistRemark,  //

          WhiteInspectType4: this.editFormFields.WhiteInspectType4,  //白片检验4-表面张力
          WhiteInspectOQC4: this.editFormFields.WhiteInspectOQC4,  //
          WhiteInspectQClevel4: this.editFormFields.WhiteInspectQClevel4,  //
          WhiteInspectSampleQty4: this.editFormFields.WhiteInspectSampleQty4,  //
          SurfaceTensionCondition: this.editFormFields.SurfaceTensionCondition,  //
          SurfaceTensionValueLiquid: this.editFormFields.SurfaceTensionValueLiquid,  //
          SurfaceTensionRemark: this.editFormFields.SurfaceTensionRemark,  //

          WhiteInspectType5: this.editFormFields.WhiteInspectType5,  //白片检验5-胶带测试
          WhiteInspectOQC5: this.editFormFields.WhiteInspectOQC5,  //
          WhiteInspectQClevel5: this.editFormFields.WhiteInspectQClevel5,  //
          WhiteInspectSampleQty5: this.editFormFields.WhiteInspectSampleQty5,  //
          TapeRemark: this.editFormFields.TapeRemark,  //

          WhiteInspectType6: this.editFormFields.WhiteInspectType6,  //白片检验6-湿热
          WhiteInspectOQC6: this.editFormFields.WhiteInspectOQC6,  //
          WhiteInspectQClevel6: this.editFormFields.WhiteInspectQClevel6,  //
          WhiteInspectSampleQty6: this.editFormFields.WhiteInspectSampleQty6,  //
          DampHeatCondition: this.editFormFields.DampHeatCondition,  //
          DampHeatRemark: this.editFormFields.DampHeatRemark,  //

          WhiteInspectType7: this.editFormFields.WhiteInspectType7,  //白片检验7-PCT
          WhiteInspectOQC7: this.editFormFields.WhiteInspectOQC7,  //
          WhiteInspectQClevel7: this.editFormFields.WhiteInspectQClevel7,  //
          WhiteInspectSampleQty7: this.editFormFields.WhiteInspectSampleQty7,  //
          PctCondition: this.editFormFields.PctCondition,  //
          PctTime: this.editFormFields.PctTime,  //
          PctRemark: this.editFormFields.PctRemark,  //

          WhiteInspectType8: this.editFormFields.WhiteInspectType8,  //白片检验8-光泽度
          WhiteInspectOQC8: this.editFormFields.WhiteInspectOQC8,  //
          WhiteInspectQClevel8: this.editFormFields.WhiteInspectQClevel8,  //
          WhiteInspectSampleQty8: this.editFormFields.WhiteInspectSampleQty8,  //
          GlossValueMax: this.editFormFields.GlossValueMax,  //
          GlossValueMin: this.editFormFields.GlossValueMin,  //

          WhiteInspectType9: this.editFormFields.WhiteInspectType9,  //白片检验9-表面烘烤
          WhiteInspectOQC9: this.editFormFields.WhiteInspectOQC9,  //
          WhiteInspectQClevel9: this.editFormFields.WhiteInspectQClevel9,  //
          WhiteInspectSampleQty9: this.editFormFields.WhiteInspectSampleQty9,  //
          BakeMistRemark: this.editFormFields.BakeMistRemark,  //
          BakeMistTime: this.editFormFields.BakeMistTime,

          WhiteInspectType10: this.editFormFields.WhiteInspectType10,  //白片10-失重
          WhiteInspectOQC10: this.editFormFields.WhiteInspectOQC10,  //
          WhiteInspectQClevel10: this.editFormFields.WhiteInspectQClevel10,  //
          WhiteInspectSampleQty10: this.editFormFields.WhiteInspectSampleQty10,  //
          LostCondition: this.editFormFields.LostCondition,  //
          LostTime: this.editFormFields.LostTime,
          LostStandardVal: this.editFormFields.LostStandardVal,  //
          LostRemark: this.editFormFields.LostRemark,

          WhiteInspectType11: this.editFormFields.WhiteInspectType11,  //白片11-丙酮擦拭
          WhiteInspectOQC11: this.editFormFields.WhiteInspectOQC11,  //
          WhiteInspectQClevel11: this.editFormFields.WhiteInspectQClevel11,  //
          WhiteInspectSampleQty11: this.editFormFields.WhiteInspectSampleQty11,  //
          AceToneWipeRemark: this.editFormFields.AceToneWipeRemark,  //

          WhiteInspectType12: this.editFormFields.WhiteInspectType12,  //白片12-百格
          WhiteInspectOQC12: this.editFormFields.WhiteInspectOQC12,  //
          WhiteInspectQClevel12: this.editFormFields.WhiteInspectQClevel12,  //
          WhiteInspectSampleQty12: this.editFormFields.WhiteInspectSampleQty12,  //
          CrossCutRemark: this.editFormFields.CrossCutRemark,  //

          WhiteInspectType13: this.editFormFields.WhiteInspectType13,  //白片13-剪切力
          WhiteInspectOQC13: this.editFormFields.WhiteInspectOQC13,  //
          WhiteInspectQClevel13: this.editFormFields.WhiteInspectQClevel13,  //
          WhiteInspectSampleQty13: this.editFormFields.WhiteInspectSampleQty13,  //
          ShearForceMin: this.editFormFields.ShearForceMin,  //
          ShearForceMax: this.editFormFields.ShearForceMax,  //
          ShearForceRemark: this.editFormFields.ShearForceRemark,  //

          WhiteInspectSizeInputQCLevel: this.editFormFields.WhiteInspectSizeInputQCLevel,  //白片14-尺寸录入、外观检测、简单外观检测
          WhiteInspectSizeInputSampleQty: this.editFormFields.WhiteInspectSizeInputSampleQty,  //
          WhiteInspectAppearQCLevel: this.editFormFields.WhiteInspectAppearQCLevel,  //
          WhiteInspectAppearSampleQty: this.editFormFields.WhiteInspectAppearSampleQty,  //
          WhiteInspectSampleAppearQCLevel: this.editFormFields.WhiteInspectSampleAppearQCLevel,  //
          WhiteInspectSampleAppearSampleQty: this.editFormFields.WhiteInspectSampleAppearSampleQty,  //
          // 可以根据需要添加更多内容
        };
        var mesdata_ = []
        mesdata_.push(readorwrite)
        let json_mesdata = JSON.stringify(mesdata_)

        console.log('上传参数:', readorwrite)
        // { WaveId: this.editFormFields.WaveId1 }
        //  使用get方法调用接口+传参数
        this.http.get('api/AmesSyncBiz/ReadOrWriteProductInfo_BF',
          { json_mesdata: json_mesdata }).then((result) => {
            loadingInstance.close();
            this.$message.success('上传成功')

          });
        //console.log('上传成功:', result);

        //以下9行注释掉的是之前传递参数的方法，出现的问题是如果没填默认值是""，后端获取的数据类型是int或decimal，就不行会判为null，导致运行不了
        // this.http.post('api/AmesSyncBiz/ReadOrWriteProductInfo_BF',
        //   readorwrite).then((result) => {
        //     console.log('上传参数2:', readorwrite)
        //     loadingInstance.close();
        //     this.$message.success('上传成功')
        //   }).catch((error) => {
        //     console.error('同步失败:', error);
        //     loadingInstance.close();
        //   });
      } else {
        this.$message.error('请输入产品代码')
      }
    },
    //下面这些方法可以保留也可以删除
    onInit() {  //框架初始化配置前，
      //示例：在按钮的最前面添加一个按钮
      //   this.buttons.unshift({  //也可以用push或者splice方法来修改buttons数组
      //     name: "按钮", //按钮名称
      //     icon: "el-icon-document", //按钮图标：https://element.eleme.cn/#/zh-CN/component/icon
      //     type: "primary", //按钮样式:https://element-plus.gitee.io/zh-CN/component/button.html
      //     //color:"#eee",//自定义按钮颜色
      //     onClick: function () {
      //       this.$Message.success("点击了按钮");
      //     }
      //   });

      //示例：设置修改新建、编辑弹出框字段标签的长度
      // this.boxOptions.labelWidth = 150;
      this.editFormOptions.forEach((option) => {
        option.forEach((item) => {
          if (item.field == 'Name') {
            item.extra = {
              render: (h, { }) => {
                return (
                  <div>
                    <el-button
                      type="primary"
                      link
                      onClick={() => {
                        //this.editFormFields.Exterimental = false;
                        if (this.editFormFields?.Name?.trim() != "") {
                          const loadingInstance = this.$loading({
                            lock: true,
                            text: '同步MES数据中···',
                            spinner: 'el-icon-loading',
                            background: 'rgba(247, 237, 237, 0.7)'
                          });

                          //  使用get方法调用接口+传参数
                          console.log(this.editFormFields.WaveId1)
                          // { WaveId: this.editFormFields.WaveId1 }
                          const readorwrite = {
                            Way: String("read"),
                            Name: String(this.editFormFields.Name),
                            // 可以根据需要添加更多内容
                          };
                          var mesdata_ = []
                          mesdata_.push(readorwrite)
                          let json_mesdata = JSON.stringify(mesdata_)
                          this.http.get('api/AmesSyncBiz/ReadOrWriteProductInfo_BF',
                            { json_mesdata: json_mesdata }).then((result) => {
                              console.log('同步成功1:', result);
                              //console.log('同步成功2:', result["data"][0]);
                              //console.log('同步成功3:', result["data"][0]["InpectionTime"]);
                              loadingInstance.close();
                              this.editFormFields.Grade = result["rows"][0]["Grade"] || ""
                              this.editFormFields.Plating = result["rows"][0]["Plating"] || ""
                              this.editFormFields.PartnerBlueprintNo = result["rows"][0]["PartnerBlueprintNo"] || ""
                              this.editFormFields.PartnerBlueprintVersion = result["rows"][0]["PartnerBlueprintVersion"] || ""
                              this.editFormFields.AtmcnBlueprintNo = result["rows"][0]["AtmcnBlueprintNo"]
                              this.editFormFields.PartName = result["rows"][0]["PartName"]
                              this.editFormFields.PartNo = result["rows"][0]["PartNo"]
                              this.editFormFields.ProductRemark = result["rows"][0]["ProductRemark"] || ""
                              this.editFormFields.Exterimental = result["rows"][0]["Exterimental"] || ""
                              this.editFormFields.Application = result["rows"][0]["Application"] || ""
                              this.editFormFields.Magnetizing = result["rows"][0]["Magnetizing"] || ""
                              this.editFormFields.RoughShape = result["rows"][0]["RoughShape"] || ""
                              this.editFormFields.RoughShapeId = result["rows"][0]["RoughShapeId"] || ""
                              this.editFormFields.ProductShape = result["rows"][0]["ProductShape"] || ""
                              this.editFormFields.ProductShapeId = result["rows"][0]["ProductShapeId"] || ""
                              this.$message.success('查询完成')
                            }).catch((error) => {
                              console.error('同步失败:', error);
                              loadingInstance.close();
                            });
                          console.log('Factory1 value:', this.editFormFields.Factory1);
                          //console.log(item); // 确认字段名是否正确
                          //this.$message.success('查询完成')
                        } else {
                          this.$message.error('请输入产品代码')
                        }
                      }}
                    >
                      <i class="el-icon-search">查询</i>
                    </el-button>
                  </div>
                )
              }
            }
          }
        })
      })
    },
    onInited() {
      //框架初始化配置后
      //如果要配置明细表,在此方法操作
      //this.detailOptions.columns.forEach(column=>{ });
      this.initFormSelectTable();

      //上传MES按钮 ,把其功能加到了保存后和编辑后
      // this.onClick_ed_up = false
      // this.boxButtons.unshift({
      //   name: "上传MES",
      //   icon: "el-icon-plus",
      //   type: "primary",
      //   onClick: () => {
      //     //console.log("当前用户信息:", this.$store.getters.getUserInfo() || '未获取到');
      //     const userInfo = this.$store.getters.getUserInfo();
      //     const userName = userInfo.userName;
      //     console.log("当前用户信息:", userInfo);
      //     // if (this.editFormFields?.Name?.trim() != "") {
      //     //   const loadingInstance = this.$loading({
      //     //     lock: true,
      //     //     text: '同步MES数据中···',
      //     //     spinner: 'el-icon-loading',
      //     //     background: 'rgba(247, 237, 237, 0.7)'
      //     //   });
      //     //   //var readorwrite = {
      //     //   const readorwrite = {
      //     //     Way: String("write"),
      //     //     Name: String(this.editFormFields.Name),
      //     //     UserName: String(userName),
      //     //     AtmcnBlueprintNo: String(this.editFormFields.AtmcnBlueprintNo),  //安泰图纸号
      //     //     PartName: this.editFormFields.PartName,  //零件名称/SAP
      //     //     PartNo: this.editFormFields.PartNo,  //零件号/组装号
      //     //     ProductRemark: this.editFormFields.ProductRemark,  //产品备注
      //     //     Exterimental: this.editFormFields.Exterimental,  //是否是试验品
      //     //     BlankForSaleOk: this.editFormFields.BlankForSaleOk,  //毛坯产品
      //     //     Application: this.editFormFields.Application,  //应用类型
      //     //     PlantIds: this.editFormFields.PlantIds,  //所属工厂
      //     //     ByproductTopIds: this.editFormFields.ByproductTopIds,  //产出其他产品
      //     //     ShareTopIds: this.editFormFields.ShareTopIds,  //共享库存工艺单
      //     //     OemProductOk: this.editFormFields.OemProductOk,  //OEM产品
      //     //     RecycleFlg: this.editFormFields.RecycleFlg,  // 可循环材料
      //     //     OriginalProductCode: this.editFormFields.OriginalProductCode,  //原发产品
      //     //     RemarkCipianjiao: this.editFormFields.RemarkCipianjiao,  // 磁偏角要求
      //     //     GeoType1: this.editFormFields.GeoType1,  // 
      //     //     GeoValue1: this.editFormFields.GeoValue1,  // 
      //     //     GeoRemark1: this.editFormFields.GeoRemark1,  // 
      //     //     GeoType2: this.editFormFields.GeoType2,  // 
      //     //     GeoValue2: this.editFormFields.GeoValue2,  // 
      //     //     GeoRemark2: this.editFormFields.GeoRemark2,  // 
      //     //     GeoType3: this.editFormFields.GeoType3,  // 
      //     //     GeoValue3: this.editFormFields.GeoValue3,  // 
      //     //     GeoRemark3: this.editFormFields.GeoRemark3,  // 
      //     //     GeoType4: this.editFormFields.GeoType4,  // 
      //     //     GeoValue4: this.editFormFields.GeoValue4,  // 
      //     //     GeoRemark4: this.editFormFields.GeoRemark4,  // 
      //     //     GeoType5: this.editFormFields.GeoType5,  // 
      //     //     GeoValue5: this.editFormFields.GeoValue5,  // 
      //     //     GeoRemark5: this.editFormFields.GeoRemark5,  // 

      //     //     Weight: this.editFormFields.Weight,  //单重
      //     //     SurfaceArea: this.editFormFields.SurfaceArea, //表面积

      //     //     RoughShapeId: this.editFormFields.RoughShapeId,  //毛坯尺寸Id
      //     //     DimenSize1: this.editFormFields.DimenSize1,  //维度尺寸1
      //     //     DimenSize2: this.editFormFields.DimenSize2,  //维度尺寸2
      //     //     DimenSize3: this.editFormFields.DimenSize3,  //维度尺寸3
      //     //     MagneticAngle: this.editFormFields.MagneticAngle,  //磁方向角度
      //     //     DimenTol1: this.editFormFields.DimenTol1,  //维度1公差（范围）
      //     //     DimenTol2: this.editFormFields.DimenTol2,  //维度2公差（范围）
      //     //     DimenTol3: this.editFormFields.DimenTol3,  //维度3公差（范围）
      //     //     MaterialGrade: this.editFormFields.MaterialGrade,  //材料性能
      //     //     SteelGradeId: this.editFormFields.SteelGradeId,  //钢号
      //     //     SinteringType: this.editFormFields.SinteringType,  //烧结工艺
      //     //     RemarkCailiao: this.editFormFields.RemarkCailiao,  //出货要求
      //     //     RemarkPackaging: this.editFormFields.RemarkPackaging,  //包装要求

      //     //     ProductShapeId: this.editFormFields.ProductShapeId,  //产品尺寸Id
      //     //     ChanpinProductDimesSize1: this.editFormFields.ChanpinProductDimesSize1,  //维度尺寸1
      //     //     ChanpinProductDimesSize2: this.editFormFields.ChanpinProductDimesSize2,  //维度尺寸2
      //     //     ChanpinProductDimesSize3: this.editFormFields.ChanpinProductDimesSize3,  //维度尺寸3
      //     //     ChanpinProductTol1: this.editFormFields.ChanpinProductTol1,  //维度1公差（范围）
      //     //     ChanpinProductTol2: this.editFormFields.ChanpinProductTol2,  //维度2公差（范围）
      //     //     ChanpinProductTol3: this.editFormFields.ChanpinProductTol3,  //维度3公差（范围）

      //     //     GradeAfterPermeation: this.editFormFields.GradeAfterPermeation,  //渗透后磁性能

      //     //     DaojiaoId: this.editFormFields.DaojiaoId,  //倒角要求
      //     //     DucenghouduId: this.editFormFields.DucenghouduId,  //镀层厚度
      //     //     RemarkDiandu: this.editFormFields.RemarkDiandu,  //电镀其他要求

      //     //     QtyPerChest: this.editFormFields.QtyPerChest,  //每箱数量
      //     //     QtyPerBox: this.editFormFields.QtyPerBox,  //每盒数量
      //     //     QtyPerBag: this.editFormFields.QtyPerBag,  //每袋数量

      //     //     PermeationGongyiId: this.editFormFields.PermeationGongyiId,  //渗透工艺


      //     //     WorkcenterType1: this.editFormFields.WorkcenterType1,  //车间类型1-加工
      //     //     MrpWorkcenter1: this.editFormFields.MrpWorkcenter1,  //工作中心1
      //     //     PassRate1: this.editFormFields.PassRate1,  //合格率1
      //     //     PenaltyPassRate1: this.editFormFields.PenaltyPassRate1,  //惩罚合格率1
      //     //     Area1: this.editFormFields.Area1,  //面积1
      //     //     GeoType1_1: this.editFormFields.GeoType1_1,  //加工1形位类型1_1
      //     //     GeoValue1_1: this.editFormFields.GeoValue1_1,  //加工1形位值1
      //     //     GeoType1_2: this.editFormFields?.GeoType1_2 ?? "",  //加工1形位类型1_2
      //     //     GeoValue1_2: this.editFormFields.GeoValue1_2,  //加工1形位值2
      //     //     GeoType1_3: this.editFormFields?.GeoType1_3 ?? "",  //加工1形位类型1_3
      //     //     GeoValue1_3: this.editFormFields.GeoValue1_3,  //加工1形位值3
      //     //     WorkunitCatalogId1: this.editFormFields.WorkunitCatalogId1,  //加工1加工类型
      //     //     SquareUnitPriceId1: this.editFormFields.SquareUnitPriceId1,  //加工1价格表项

      //     //     WorkcenterType2: this.editFormFields.WorkcenterType2,  //车间类型2-渗透
      //     //     MrpWorkcenter2: this.editFormFields.MrpWorkcenter2,  //工作中心2-渗透
      //     //     Magnetic: this.editFormFields.Magnetic,  //渗透-磁性能性能要求
      //     //     WorkcenterType3: this.editFormFields.WorkcenterType3,  //车间类型2-渗透
      //     //     MrpWorkcenter3: this.editFormFields.MrpWorkcenter3,  //工作中心2-渗透
      //     //     ChamferRequirements: this.editFormFields.ChamferRequirements,  //倒角要求
      //     //     WorkcenterType4: this.editFormFields.WorkcenterType4,  //车间类型2-渗透
      //     //     MrpWorkcenter4: this.editFormFields.MrpWorkcenter4,  //工作中心2-渗透
      //     //     PassRate2: this.editFormFields.PassRate2,  //电镀合格率

      //     //     BlankInspectType1: this.editFormFields.BlankInspectType1,  //毛坯检验项目1
      //     //     BlankInspectOQC1: this.editFormFields.BlankInspectOQC1,  //毛坯OQC标记1
      //     //     BlankInspectQClevel1: this.editFormFields.BlankInspectQClevel1,  //毛坯QC级别1
      //     //     BlankInspectSampleQty1: this.editFormFields.BlankInspectSampleQty1,  //毛坯送样数量1
      //     //     BH_Temperature: this.editFormFields.BH_Temperature,  //毛坯BH检验-温度
      //     //     BH_br_range: this.editFormFields.BH_br_range,  //毛坯BH检验-
      //     //     BH_hcb_range: this.editFormFields.BH_hcb_range,  //毛坯BH检验-
      //     //     BH_hcj_range: this.editFormFields.BH_hcj_range,  //毛坯BH检验-
      //     //     BH_bh_range: this.editFormFields.BH_bh_range,  //毛坯BH检验-
      //     //     BH_hk_range: this.editFormFields.BH_hk_range,  //毛坯BH检验-
      //     //     BH_hd5_range: this.editFormFields.BH_hd5_range,  //毛坯BH检验-
      //     //     BH_percent_range: this.editFormFields.BH_percent_range,  //毛坯BH检验-

      //     //     BlankInspectType2: this.editFormFields.BlankInspectType2,  //毛坯检验项目2
      //     //     BlankInspectOQC2: this.editFormFields.BlankInspectOQC2,  //毛坯OQC标记2
      //     //     BlankInspectQClevel2: this.editFormFields.BlankInspectQClevel2,  //毛坯QC级别2
      //     //     BlankInspectSampleQty2: this.editFormFields.BlankInspectSampleQty2,  //毛坯送样数量2
      //     //     BlankAppearRequirement: this.editFormFields.BlankAppearRequirement,  //毛坯外观检验-外观要求

      //     //     WhiteInspectType1: this.editFormFields.WhiteInspectType1,  //白片检验1-镀层厚度
      //     //     WhiteInspectOQC1: this.editFormFields.WhiteInspectOQC1,  //
      //     //     WhiteInspectQClevel1: this.editFormFields.WhiteInspectQClevel1,  //
      //     //     WhiteInspectSampleQty1: this.editFormFields.WhiteInspectSampleQty1,  //
      //     //     PlatingThicknessMin: this.editFormFields.PlatingThicknessMin,  //
      //     //     PlatingThicknessMax: this.editFormFields.PlatingThicknessMax,  //
      //     //     ThicknessFirst: this.editFormFields.ThicknessFirst,  //
      //     //     ThicknessSecond: this.editFormFields.ThicknessSecond,  //
      //     //     ThicknessThird: this.editFormFields.ThicknessThird,  //

      //     //     WhiteInspectType2: this.editFormFields.WhiteInspectType2,  //白片检验2-磁通
      //     //     WhiteInspectOQC2: this.editFormFields.WhiteInspectOQC2,  //
      //     //     WhiteInspectQClevel2: this.editFormFields.WhiteInspectQClevel2,  //
      //     //     WhiteInspectSampleQty2: this.editFormFields.WhiteInspectSampleQty2,  //
      //     //     MagneticFluxValue: this.editFormFields.MagneticFluxValue,  //
      //     //     MagneticFluxUp: this.editFormFields.MagneticFluxUp,  //
      //     //     MagneticFluxDown: this.editFormFields.MagneticFluxDown,  //
      //     //     SurfaceUp: this.editFormFields.SurfaceUp,  //
      //     //     SurfaceDown: this.editFormFields.SurfaceDown,  //
      //     //     OneHours: this.editFormFields.OneHours,  //
      //     //     OneTemperature: this.editFormFields.OneTemperature,  //
      //     //     OneBakingCon: this.editFormFields.OneBakingCon,  //
      //     //     MagneticFluxRemark: this.editFormFields.MagneticFluxRemark,  //

      //     //     WhiteInspectType3: this.editFormFields.WhiteInspectType3,  //白片检验3-盐雾
      //     //     WhiteInspectOQC3: this.editFormFields.WhiteInspectOQC3,  //
      //     //     WhiteInspectQClevel3: this.editFormFields.WhiteInspectQClevel3,  //
      //     //     WhiteInspectSampleQty3: this.editFormFields.WhiteInspectSampleQty3,  //
      //     //     SaltMistCondition: this.editFormFields.SaltMistCondition,  //
      //     //     SaltMistTime: this.editFormFields.SaltMistTime,  //
      //     //     SaltMistRemark: this.editFormFields.SaltMistRemark,  //

      //     //     WhiteInspectType4: this.editFormFields.WhiteInspectType4,  //白片检验4-表面张力
      //     //     WhiteInspectOQC4: this.editFormFields.WhiteInspectOQC4,  //
      //     //     WhiteInspectQClevel4: this.editFormFields.WhiteInspectQClevel4,  //
      //     //     WhiteInspectSampleQty4: this.editFormFields.WhiteInspectSampleQty4,  //
      //     //     SurfaceTensionCondition: this.editFormFields.SurfaceTensionCondition,  //
      //     //     SurfaceTensionValueLiquid: this.editFormFields.SurfaceTensionValueLiquid,  //
      //     //     SurfaceTensionRemark: this.editFormFields.SurfaceTensionRemark,  //

      //     //     WhiteInspectType5: this.editFormFields.WhiteInspectType5,  //白片检验5-胶带测试
      //     //     WhiteInspectOQC5: this.editFormFields.WhiteInspectOQC5,  //
      //     //     WhiteInspectQClevel5: this.editFormFields.WhiteInspectQClevel5,  //
      //     //     WhiteInspectSampleQty5: this.editFormFields.WhiteInspectSampleQty5,  //
      //     //     TapeRemark: this.editFormFields.TapeRemark,  //

      //     //     WhiteInspectType6: this.editFormFields.WhiteInspectType6,  //白片检验6-湿热
      //     //     WhiteInspectOQC6: this.editFormFields.WhiteInspectOQC6,  //
      //     //     WhiteInspectQClevel6: this.editFormFields.WhiteInspectQClevel6,  //
      //     //     WhiteInspectSampleQty6: this.editFormFields.WhiteInspectSampleQty6,  //
      //     //     DampHeatCondition: this.editFormFields.DampHeatCondition,  //
      //     //     DampHeatRemark: this.editFormFields.DampHeatRemark,  //

      //     //     WhiteInspectType7: this.editFormFields.WhiteInspectType7,  //白片检验7-PCT
      //     //     WhiteInspectOQC7: this.editFormFields.WhiteInspectOQC7,  //
      //     //     WhiteInspectQClevel7: this.editFormFields.WhiteInspectQClevel7,  //
      //     //     WhiteInspectSampleQty7: this.editFormFields.WhiteInspectSampleQty7,  //
      //     //     PctCondition: this.editFormFields.PctCondition,  //
      //     //     PctTime: this.editFormFields.PctTime,  //
      //     //     PctRemark: this.editFormFields.PctRemark,  //

      //     //     WhiteInspectType8: this.editFormFields.WhiteInspectType8,  //白片检验8-光泽度
      //     //     WhiteInspectOQC8: this.editFormFields.WhiteInspectOQC8,  //
      //     //     WhiteInspectQClevel8: this.editFormFields.WhiteInspectQClevel8,  //
      //     //     WhiteInspectSampleQty8: this.editFormFields.WhiteInspectSampleQty8,  //
      //     //     GlossValueMax: this.editFormFields.GlossValueMax,  //
      //     //     GlossValueMin: this.editFormFields.GlossValueMin,  //

      //     //     WhiteInspectType9: this.editFormFields.WhiteInspectType9,  //白片检验9-表面烘烤
      //     //     WhiteInspectOQC9: this.editFormFields.WhiteInspectOQC9,  //
      //     //     WhiteInspectQClevel9: this.editFormFields.WhiteInspectQClevel9,  //
      //     //     WhiteInspectSampleQty9: this.editFormFields.WhiteInspectSampleQty9,  //
      //     //     BakeMistRemark: this.editFormFields.BakeMistRemark,  //
      //     //     BakeMistTime: this.editFormFields.BakeMistTime,

      //     //     WhiteInspectType10: this.editFormFields.WhiteInspectType10,  //白片10-失重
      //     //     WhiteInspectOQC10: this.editFormFields.WhiteInspectOQC10,  //
      //     //     WhiteInspectQClevel10: this.editFormFields.WhiteInspectQClevel10,  //
      //     //     WhiteInspectSampleQty10: this.editFormFields.WhiteInspectSampleQty10,  //
      //     //     LostCondition: this.editFormFields.LostCondition,  //
      //     //     LostTime: this.editFormFields.LostTime,
      //     //     LostStandardVal: this.editFormFields.LostStandardVal,  //
      //     //     LostRemark: this.editFormFields.LostRemark,

      //     //     WhiteInspectType11: this.editFormFields.WhiteInspectType11,  //白片11-丙酮擦拭
      //     //     WhiteInspectOQC11: this.editFormFields.WhiteInspectOQC11,  //
      //     //     WhiteInspectQClevel11: this.editFormFields.WhiteInspectQClevel11,  //
      //     //     WhiteInspectSampleQty11: this.editFormFields.WhiteInspectSampleQty11,  //
      //     //     AceToneWipeRemark: this.editFormFields.AceToneWipeRemark,  //

      //     //     WhiteInspectType12: this.editFormFields.WhiteInspectType12,  //白片12-百格
      //     //     WhiteInspectOQC12: this.editFormFields.WhiteInspectOQC12,  //
      //     //     WhiteInspectQClevel12: this.editFormFields.WhiteInspectQClevel12,  //
      //     //     WhiteInspectSampleQty12: this.editFormFields.WhiteInspectSampleQty12,  //
      //     //     CrossCutRemark: this.editFormFields.CrossCutRemark,  //

      //     //     WhiteInspectType13: this.editFormFields.WhiteInspectType13,  //白片13-剪切力
      //     //     WhiteInspectOQC13: this.editFormFields.WhiteInspectOQC13,  //
      //     //     WhiteInspectQClevel13: this.editFormFields.WhiteInspectQClevel13,  //
      //     //     WhiteInspectSampleQty13: this.editFormFields.WhiteInspectSampleQty13,  //
      //     //     ShearForceMin: this.editFormFields.ShearForceMin,  //
      //     //     ShearForceMax: this.editFormFields.ShearForceMax,  //
      //     //     ShearForceRemark: this.editFormFields.ShearForceRemark,  //

      //     //     WhiteInspectSizeInputQCLevel: this.editFormFields.WhiteInspectSizeInputQCLevel,  //白片14-尺寸录入、外观检测、简单外观检测
      //     //     WhiteInspectSizeInputSampleQty: this.editFormFields.WhiteInspectSizeInputSampleQty,  //
      //     //     WhiteInspectAppearQCLevel: this.editFormFields.WhiteInspectAppearQCLevel,  //
      //     //     WhiteInspectAppearSampleQty: this.editFormFields.WhiteInspectAppearSampleQty,  //
      //     //     WhiteInspectSampleAppearQCLevel: this.editFormFields.WhiteInspectSampleAppearQCLevel,  //
      //     //     WhiteInspectSampleAppearSampleQty: this.editFormFields.WhiteInspectSampleAppearSampleQty,  //
      //     //     // 可以根据需要添加更多内容
      //     //   };
      //     //   var mesdata_ = []
      //     //   mesdata_.push(readorwrite)
      //     //   let json_mesdata = JSON.stringify(mesdata_)

      //     //   console.log('上传参数:', readorwrite)
      //     //   // { WaveId: this.editFormFields.WaveId1 }
      //     //   //  使用get方法调用接口+传参数
      //     //   this.http.get('api/AmesSyncBiz/ReadOrWriteProductInfo_BF',
      //     //     { json_mesdata: json_mesdata }).then((result) => {
      //     //       loadingInstance.close();
      //     //       this.$message.success('上传成功')

      //     //     });
      //     //   //console.log('上传成功:', result);

      //     //   //以下9行注释掉的是之前传递参数的方法，出现的问题是如果没填默认值是""，后端获取的数据类型是int或decimal，就不行会判为null，导致运行不了
      //     //   // this.http.post('api/AmesSyncBiz/ReadOrWriteProductInfo_BF',
      //     //   //   readorwrite).then((result) => {
      //     //   //     console.log('上传参数2:', readorwrite)
      //     //   //     loadingInstance.close();
      //     //   //     this.$message.success('上传成功')
      //     //   //   }).catch((error) => {
      //     //   //     console.error('同步失败:', error);
      //     //   //     loadingInstance.close();
      //     //   //   });
      //     // } else {
      //     //   this.$message.error('请输入产品代码')
      //     // }

      //   }
      // })

      // this.boxButtons.unshift({
      //   name: "变更",
      //   icon: "el-icon-plus",
      //   type: "primary",
      //   onClick: () => {
      //     if (this.editFormFields?.Name?.trim() != "") {
      //       const loadingInstance = this.$loading({
      //         lock: true,
      //         text: '同步MES数据中···',
      //         spinner: 'el-icon-loading',
      //         background: 'rgba(247, 237, 237, 0.7)'
      //       });
      //       const readorwrite = {
      //         Way: "write",
      //         Name: this.editFormFields.Name,  //产品代码

      //         Grade: this.editFormFields.Grade,  //安泰图纸号

      //         // 可以根据需要添加更多内容
      //       };
      //       //  使用get方法调用接口+传参数
      //       console.log('上传参数:', readorwrite)
      //       // { WaveId: this.editFormFields.WaveId1 }

      //       this.http.post('api/AmesSyncBiz/ReadOrWriteProductInfo_BF',
      //         readorwrite).then((result) => {
      //           console.log('上传成功:', result);
      //           loadingInstance.close();
      //           this.$message.success('上传成功')
      //         }).catch((error) => {
      //           console.error('同步失败:', error);
      //           loadingInstance.close();
      //         });
      //     } else {
      //       this.$message.error('请输入产品代码')
      //     }

      //   }
      // })

    },
    searchBefore(param) {
      //界面查询前,可以给param.wheres添加查询参数
      //返回false，则不会执行查询
      return true;
    },
    searchAfter(result) {
      //查询后，result返回的查询数据,可以在显示到表格前处理表格的值
      return true;
    },
    //需要现在onInited()中先声明该方法
    initFormSelectTable(item) {
      this.editFormOptions.forEach((option) => {
        option.forEach((item) => {
          if (item.field == 'Application') {
            //if（this.editFormFields.DianduNo.）
            //电镀号处理下拉框
            item.url = 'api/AmesSyncBiz/SyncProductInfoPart'  //后端代码中<ATkg.BizAppProject/Controllers/AmesSyncController.cs中的Route
            //item.url = 'api/AmesSyncBiz/SyncMaterialInventory'  //后端代码中<ATkg.BizAppProject/Controllers/AmesSyncController.cs中的Route
            item.columns = [
              { field: 'Name', title: '应用类型', type: 'string', width: 140, hidden: false },
              { field: 'Id', title: 'Id', type: 'string', width: 140, hidden: false },

              // { field: 'ProductId', title: '产品代码', type: 'string', width: 130, hidden: false },
              // { field: 'Spec', title: '产品规格', type: 'string', width: 110, hidden: false },
              // { field: 'Grade', title: '产品性能', type: 'string', width: 110, hidden: false },
              // { field: 'IncomeQty', title: '来料总数', type: 'int', width: 110, hidden: false },
              // { field: 'IncomeWeight', title: '来料重量', type: 'string', width: 110, hidden: false },
            ]
            item.onSelect = (rows) => {
              //给表单字段赋值
              this.editFormFields.Application = rows[0].Name
              this.editFormFields.AtmcnBlueprintNo = rows[0].Id

            }
            item.loadBefore = (param, callback) => {
              param.value = "Application";
              callback(true);
            }
            item.loadAfter = (rows, callback, result) => {
              callback(true);
            }
            //监听输入框变动与回车事件
            item.onKeyPress = (val, $event) => {
            }
            //设置弹出框高度(默认200)
            item.height = 500;
            //设置弹出框宽度(默认500)
            item.width = 200;
            // item.textInline = false; //设置表格超出自动换行显示
            //设置表格是否单选
            item.single = true;
            //隐藏分页
            item.paginationHide = true;
          }
        })
      })
    },
    addBefore(formData) {
      //新建保存前formData为对象，包括明细表，可以给给表单设置值，自己输出看formData的值
      return true;
    },
    updateBefore(formData) {
      //编辑保存前formData为对象，包括明细表、删除行的Id
      return true;
    },
    delBefore(formData) {
      //编辑保存前formData为对象，包括明细表、删除行的Id
      return true;
    },
    addAfter(formData) {
      //新建保存前formData为对象，包括明细表，可以给给表单设置值，自己输出看formData的值
      //添加后刷新字典
      //添加后将数据同步至Mes
      console.log("保存后1")
      this.syncToMes();
      console.log("保存后2")
      return true;
    },
    updateAfter(formData) {
      //编辑保存前formData为对象，包括明细表、删除行的Id
      //添加后刷新字典
      //编辑后将数据同步至Mes
      this.syncToMes();
      return true;
    },
    delAfter(formData) {
      //编辑保存前formData为对象，包括明细表、删除行的Id
      //添加后刷新字典

      return true;
    },
    rowClick({ row, column, event }) {
      //查询界面点击行事件
      // this.$refs.table.$refs.table.toggleRowSelection(row); //单击行时选中当前行;
    },
    modelOpenAfter(row) {
      let isAdd = this.currentAction == 'Add';
      //新建时设置实验产品的默认值
      if (isAdd) {
        this.editFormFields.Exterimental = false;
        this.editFormFields.BlankForSaleOk = false;
        this.editFormFields.OemProductOk = false;
        this.editFormFields.RecycleFlg = false;
        this.editFormFields.BlankInspectType1 = "B-H曲线";
        this.editFormFields.BlankInspectType2 = "毛坯外观";

      } else {
        this.editFormFields.BlankInspectType1 = "B-H曲线";
        this.editFormFields.BlankInspectType2 = "毛坯外观";
      }
      //点击编辑、新建按钮弹出框后，可以在此处写逻辑，如，从后台获取数据
      //(1)判断是编辑还是新建操作： this.currentAction=="Add";
      //(2)给弹出框设置默认值
      //(3)this.editFormFields.字段="xxx";
      //如果需要给下拉框设置默认值，请遍历this.editFormOptions找到字段配置对应data属性的key值
      //看不懂就把输出看：console.log(this.editFormOptions)
    }
  }
};
export default extension;
